<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>NPanday - Creating a Simple Project</title>
    <style type="text/css" media="all">
      @import url("../css/maven-base.css");
      @import url("../css/maven-theme.css");
      @import url("../css/site.css");
    </style>
    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      </head>
  <body class="composite">
    <div id="banner">
                    <span id="bannerLeft">
    
                                            <img src="../." alt="" />
    
            </span>
                          <span id="bannerRight">
    
                                            <img src=".././images/logo-home.png" alt="" />
    
            </span>
            <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
  
  
    
            <div class="xleft">
        Last Published: 2010-01-21
                      </div>
            <div class="xright">      
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
  
  
    
                   <h5>General Info</h5>
            <ul>
              
    <li class="none">
                    <a href="../index.html">NPanday Overview</a>
          </li>
              
    <li class="none">
                    <a href="../release-notes.html">NPanday Release Notes</a>
          </li>
              
    <li class="none">
                    <a href="../faqs.html">NPanday FAQs</a>
          </li>
              
    <li class="none">
                    <a href="../workarounds.html">NPanday Workarounds</a>
          </li>
              
    <li class="none">
                    <a href="../plugins/index.html">NPanday Plugins</a>
          </li>
              
    <li class="none">
                    <a href="../conventions.html">Conventions</a>
          </li>
          </ul>
              <h5>Getting Started</h5>
            <ul>
              
                
              
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="../installation/index.html">Installation</a>
                </li>
              
                
              
      
            
      
              
        <li class="collapsed">
                    <a href="../installation/uninstall.html">Uninstall NPanday</a>
                </li>
              
    <li class="none">
                    <a href="../guide/build_tool.html">Using the Build Tool</a>
          </li>
              
    <li class="none">
                    <a href="../guide/dependencies.html">Project Dependencies</a>
          </li>
              
    <li class="none">
                    <a href="../guide/install_file.html">Installing Files Manually</a>
          </li>
              
    <li class="none">
              <strong>Creating a Simple Project</strong>
        </li>
              
    <li class="none">
                    <a href="../guide/load_project.html">Loading Project/Solution</a>
          </li>
              
    <li class="none">
                    <a href="../guide/quickstart.html">Quick Start</a>
          </li>
              
    <li class="none">
                    <a href="../guide/portability.html">Portability</a>
          </li>
          </ul>
              <h5>IDE Integration</h5>
            <ul>
              
    <li class="none">
                    <a href="../ide/execute_goals.html">Executing Maven Goals</a>
          </li>
              
    <li class="none">
                    <a href="../ide/assembly_key.html">Setting Assembly Key</a>
          </li>
              
    <li class="none">
                    <a href="../ide/remote_repo.html">Remote Repository</a>
          </li>
              
    <li class="none">
                    <a href="../ide/settings.html">Using Custom Settings</a>
          </li>
              
    <li class="none">
                    <a href="../ide/importing.html">Importing Projects</a>
          </li>
              
    <li class="none">
                    <a href="../ide/artifacts.html">Repository Artifacts</a>
          </li>
              
    <li class="none">
                    <a href="../ide/references.html">Project References</a>
          </li>
              
    <li class="none">
                    <a href="../ide/web_references.html">Web References</a>
          </li>
              
                
              
      
            
      
              
        <li class="collapsed">
                    <a href="../ide/release.html">Releasing Project</a>
                </li>
              
    <li class="none">
                    <a href="../ide/test.html">Integration Test</a>
          </li>
          </ul>
              <h5>Project Information</h5>
            <ul>
              
    <li class="none">
                    <a href="../..">NPanday Site</a>
          </li>
              
    <li class="none">
                    <a href="https://npanday.svn.codeplex.com/svn/" class="externalLink">NPanday SVN</a>
          </li>
              
    <li class="none">
                    <a href="http://maven.apache.org/" class="externalLink">Maven</a>
          </li>
              
    <li class="none">
                    <a href="http://www.mono-project.com/" class="externalLink">Mono Project</a>
          </li>
              
    <li class="none">
                    <a href="http://dotgnu.org/" class="externalLink">DotGNU</a>
          </li>
          </ul>
              <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
            
      
              
        <li class="collapsed">
                    <a href="../project-info.html">Project Information</a>
                </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
  
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Creating a Simple Project</h2>
<p>Before you start this procedure, you must have all <a href="../installation/index.html"> Pre-requisites</a> in place and have successfully completed all steps in the previous section entitled Installing and Verifying NPanday .NET Build Tool.</p>
<ol type="1"><li>Create an empty directory for your project. For example: <div class="source"><pre>  mkdir npandaytest
  cd npandaytest</pre>
</div>
</li>
<li>From a command shell go to the directory that contains the POM file, and execute the following command (In the example, execute the command from the <tt>npandaytest</tt> directory) to create a C# or VB project:<p>For C#: <tt>mvn archetype:create -DgroupId=npanday -DartifactId=NPanday.Test -DarchetypeArtifactId=maven-archetype-dotnet-simple -DarchetypeGroupId=org.apache.maven.dotnet -DarchetypeVersion=[version]</tt></p>
<p>For VB: <tt>mvn archetype:create -DgroupId=npanday -DartifactId=NPanday.Test -DarchetypeArtifactId=maven-archetype-vb-simple -DarchetypeGroupId=org.apache.maven.dotnet -DarchetypeVersion=[version]</tt></p>
<p>The command creates the project in the NPanday.Test directory, which will now contain the following for a C# project (and a VB project will be similar with a vb directory instead of the csharp directory shown):</p>
<div class="source"><pre>.
|-- src
| `-- main
|   `-- csharp
|     `-- Sample
|       `-- MyApp.cs
|   `-- resources
| `-- test
|   `-- csharp
`- pom.xml</pre>
</div>
</li>
<li>From inside the Solution directory (<tt>NPanday.Test</tt>), execute the following command to build and install the NPanday.Test DLL files into your repository:<p><tt>mvn install</tt></p>
<p>The <tt>mvn install</tt> command typically puts artifacts (installs them) into the repository here, <tt>C:\Documents and Settings\[user_home]\.m2\repository</tt>.</p>
<p>NPanday installs the artifacts in a .NET local repository, located in <tt>C:\Documents and Settings\[user_home]\.m2\uac</tt>.</p>
<p>For the <tt>NPanday.Test</tt> solution the artifact is placed here, <tt>C:\Documents and Settings\[user_home]\.m2\uac\gac_msil\NPanday.Test\1.0-SNAPSHOT__NPanday\NPanday.Test.dll</tt></p>
<p>The contents in <tt>C:\Documents and Settings\[user_home]\.m2\uac\gac_msil</tt> SHOULD NOT be manually modified or the project build will fail due to artifacts that are not properly indexed and are not synchronized with the repository. In case the contents have been modified, delete the <tt>C:\Documents and Settings\[user_home]\.m2\uac</tt> directory then re-install the project.</p>
<p>If the build fails on nunit-console see the <a href="../installation/index.html"> Pre-requisites</a> section for information on installing NUnit 2.2+ and adding it to your PATH.</p>
</li>
<li>Then clean up the target directory and download dependencies by executing:<p><tt>mvn clean</tt></p>
</li>
<li>In a command shell, still from the Solution directory (<tt>NPanday.Test</tt> in this example), execute the following command to generate the Solution:<p><tt>mvn npanday.plugin:NPanday.Plugin.Solution.JavaBinding:Solution</tt></p>
</li>
<li>This command creates the Solution file (<tt>*.sln</tt>) that corresponds to the Solution directory you just created. For example, the Solution directory was <tt>NPanday.Test</tt>, so the Solution file is <tt>NPanday.Test.sln</tt>. After you execute the command, verify the Solution directory now contains the Solution file. If so, then you are ready to load the project and solution.</li>
</ol>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2010
    
          NPanday
          
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
